package zc.com.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class mavenUtil {
   static String DRIVER = "com.mysql.cj.jdbc.Driver";
   static String URL = "jdbc:mysql://localhost:3306/zc206";
   static String USER = "root";
   static String PASSWORD = "123456";
   /*
   * 获取连接
   * @return
   * */
   public static Connection getConn(){
       Connection conn=null;
       try {
           Class.forName(DRIVER);
           conn = DriverManager.getConnection(URL,USER,PASSWORD);
           return conn;
       }catch (Exception e){
           e.printStackTrace();
       }
       return conn;
   }
}
